﻿<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8" name="viewport" content="width=device-width" />
    <title>生产管理粗纱机</title>
    <script src="../Content/scripts/jquery-1.11.1.min.js"></script>
    <script src="../Content/scripts/bootstrap/bootstrap.min.js"></script>
    <link href="../Content/scripts/plugins/jquery-ui/jquery-ui.min.css" rel="stylesheet" />
    <script src="../Content/scripts/plugins/jquery-ui/jquery-ui.min.js"></script>
    <!-- Bootstrap -->
    <link rel="stylesheet" type="text/css" href="../css/bootstrap.min.css" />
    <link href="../Content/styles/font-awesome.min.css" rel="stylesheet" />
    <link href="../Content/adminLTE/css/index.css" rel="stylesheet" />
    <link href="../Content/scripts/plugins/jqgrid/jqgrid.css" rel="stylesheet" />
    <link href="../Content/styles/learun-ui.css" rel="stylesheet" />
    <script src="../Content/scripts/plugins/layout/jquery.layout.js"></script>
    <script src="../Content/scripts/plugins/dialog/dialog.js"></script>
    <script src="../Content/scripts/plugins/jqgrid/grid.locale-cn.js"></script>
    <script src="../Content/scripts/plugins/jqgrid/jqgrid.min.js"></script>
    <script src="../Content/scripts/utils/learun-ui.js"></script>
    <script src="../Content/scripts/utils/learun-form.js"></script>
    <script src="../My97DatePicker/WdatePicker.js"></script>
    <script src="../js/highcharts.js"></script>
    <script src="../js/highcharts-3d.js"></script>
    <script src="../js/getUrlParam.js"></script>
    <script src="MFGjs.js"></script>


    <style type="text/css">
        body {
            margin: 0px;
            margin-top: 10px;
        }

        .form .formTitle {
            width: 150px;
            font-size: 25px;
        }

        .valuestyle {
            font-size: 25px;
        }

        #title {
            font-size: 30px;
            text-shadow: 3px 3px 3px rgba(0,0,0,0.5);
        }

        #time {
            font-size: 20px;
            float: right;
            line-height: 50px;
            right: 40px;
            position: fixed;
            color: #65b540;
        }

        a {
            color: skyblue;
            text-decoration: none;
        }
    </style>
</head>
<body>
    <div style="text-align: center; height: 50px;">
        <span id="title">生产信息</span>
        <span id="time"></span>
    </div>
    <ul id="myTab" class="nav nav-tabs">
        <li class="active">
            <a href="#home" data-toggle="tab">
                基本信息
            </a>
        </li>
        <li><a href="#cusha" data-toggle="tab">粗纱机信息</a></li>
        <li><a href="#weisha" data-toggle="tab">尾纱机信息</a></li>
    </ul>
    <div id="myTabContent" class="tab-content">
        <div class="tab-pane fade " id="cusha">
            <div class="ui-layout" id="layout" style="width:100%;">
                <div class="ui-layout-west" id="westpanel">
                    <div class="west-Panel">
                        <div class="panel-Title">车间布局图</div>
                        <img src="" id="chejianimg" />
                    </div>
                </div>

                <div class="ui-layout-center" id="centerpanel">
                    <div class="center-Panel">
                        <div class="panel-Title">目标产量完成产量</div>
                        <table class="form" id="ruleinfo">
                            <tr>
                                <th class="formTitle">目标产量:</th>
                                <td class="formValue">
                                    <label class="valuestyle" id="mubiaochanliang">40S</label>
                                </td>
                                <td class="formValue">
                                    <label class="valuestyle">1T</label>
                                </td>
                            </tr>
                            <tr>
                                <th class="formTitle">粗纱:</th>
                                <td class="formValue">
                                    <label class="valuestyle">60S</label>
                                </td>
                                <td class="formValue">
                                    <label class="valuestyle">1.5T</label>
                                </td>
                            </tr>
                            <tr>
                                <th class="formTitle"></th>
                                <td class="formValue">
                                    <label class="valuestyle">100S</label>
                                </td>
                                <td class="formValue">
                                    <label class="valuestyle">1T</label>
                                </td>
                            </tr>
                            <tr>
                                <th class="formTitle">完成产量:</th>
                                <td class="formValue">
                                    <label class="valuestyle">40S</label>
                                </td>
                                <td class="formValue">
                                    <label class="valuestyle">0.8T</label>
                                </td>
                            </tr>
                            <tr>
                                <th class="formTitle">粗纱:</th>
                                <td class="formValue">
                                    <label class="valuestyle">60S</label>
                                </td>
                                <td class="formValue">
                                    <label class="valuestyle">1.5T</label>
                                </td>
                            </tr>
                            <tr>
                                <th class="formTitle"></th>
                                <td class="formValue">
                                    <label class="valuestyle">100S</label>
                                </td>
                                <td class="formValue">
                                    <label class="valuestyle">1T</label>
                                </td>
                            </tr>
                            <tr>
                                <th class="formTitle">尾纱管:</th>
                                <td class="formValue">
                                    <label class="valuestyle">1000个</label>
                                </td>
                            </tr>
                            <tr>
                                <th class="formTitle">纱库:</th>
                                <td class="formValue">
                                    <label class="valuestyle">40S</label>
                                </td>
                                <td class="formValue">
                                    <label class="valuestyle">420锭</label>
                                </td>
                            </tr>
                            <tr>
                                <th class="formTitle"></th>
                                <td class="formValue">
                                    <label class="valuestyle">60S</label>
                                </td>
                                <td class="formValue">
                                    <label class="valuestyle">300锭</label>
                                </td>
                            </tr>
                            <tr>
                                <th class="formTitle"></th>
                                <td class="formValue">
                                    <label class="valuestyle">100S</label>
                                </td>
                                <td class="formValue">
                                    <label class="valuestyle">400锭</label>
                                </td>
                            </tr>
                        </table>
                    </div>
                </div>
            </div>
        </div>


        <div class="tab-pane fade in active" id="home">
            <div class="ui-layout" id="layoutcusha" style="width:100%;">
                <div class="ui-layout-west" id="cushawestpanel">
                    <div class="west-Panel">
                        <div class="panel-Title">粗纱信息列表</div>

                    </div>
                </div>

                <div class="ui-layout-center" id="cushacenterpanel">
                    <div class="center-Panel">
                        <div class="panel-Title">粗纱实时生产信息</div>
                        <table class="form" id="cushashengchan"></table>
                        <div class="panel-Title" style="border-top: 1px solid #ccc; ">停车占比</div>
                        <div id="container" style="width: 100%; text-align:center;  margin: 0 auto">

                        </div>
                    </div>
                </div>
            </div>
        </div>
        <div class="tab-pane fade" id="weisha">

        </div>

    </div>
    <script>
        //var IDs = UrlParam.paramValues("ID");
        //var ID = IDs[0];
        var width = "";
        var height = "";

        $(document).ready(function () {
            width = $(window).width();
            height = $(window).height();
            $("#layout").height(height - 100);
            $("#layoutcusha").height(height - 100);
            $("#westpanel").height(height - 100);
            $("#cushawestpanel").height(height - 100);
            $("#centerpanel").height(height - 100);
            $("#cushacenterpanel").height(height - 100);
            $("#chejianimg").height(height - 150);
            $("#ruleinfo").height(height - 150);
            $("#chejianimg").width(width - 450);
            $("#cushashengchan").height(height * 0.25);
            $("#container").height(height * 0.5);

            $('a[data-toggle="tab"]').on('shown.bs.tab', function (e) {
                //layout布局
                $('#layout').layout({
                    applyDemoStyles: true,
                    west: {
                        size: $(window).width() * 0.8
                    },
                    onresize: function () {
                        $(window).resize()
                    }
                });

            });
        })


        $('#layoutcusha').layout({
            applyDemoStyles: true,
            west: {
                size: $(window).width() * 0.4
            },
            onresize: function () {
                $(window).resize()
            }
        });

        //$.mfgjs.getCustomInfoByID(ID);

        setInterval(function () {
            fnDate();
        }, 1000);

        //js 获取当前时间
        function fnDate() {
            var oDiv = document.getElementById("time");
            var date = new Date();
            var year = date.getFullYear();//当前年份
            var month = date.getMonth();//当前月份
            var data = date.getDate();//天
            var hours = date.getHours();//小时
            var minute = date.getMinutes();//分
            var second = date.getSeconds();//秒
            var time = year + "-" + fnW((month + 1)) + "-" + fnW(data) + " " + fnW(hours) + ":" + fnW(minute) + ":" + fnW(second);
            oDiv.innerHTML = time;
        }
        //补位 当某个字段不是两位数时补0
        function fnW(str) {
            var num;
            str > 9 ? num = str : num = "0" + str;
            return num;
        }
    </script>

</body>
</html>